/*
 * @Author: linjituan linjituan@revolution.com
 * @Date: 2024-10-23 20:28:13
 * @LastEditors: linjituan linjituan@revolution.com
 * @LastEditTime: 2024-11-05 23:08:44
 * @FilePath: \hm-twx-admin\src\api\pin\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defHttp } from '@/utils/http/axios'

// 查询地址信息
export function getAddressInfo(id: string) {
  return defHttp.get({ url: 'https://man.metaid.io/api/info/address/' + id })
}

// 查询关注详情
export function getFollowingList(id: string) {
  return defHttp.get({ url: `https://man.metaid.io/api/metaid/followingList/${id}` })
}

// 查询消息详情
export function getPinInfo(id: string) {
  return defHttp.get({ url: `https://man.metaid.io/api/pin/${id}` })
}


// 查看等级费用
export function getRecommended() {
  return defHttp.get({ url: `https://mempool.space/api/v1/fees/recommended` })
}

// 通过metaId列表获取关注的pin信息
export function createFollowPin(data) {
  return defHttp.post({ url: 'https://man.metaid.io/api/getAllPinByPathAndMetaId', data })
}

// 修改node_pin
export function updatePin(data) {
  return defHttp.put({ url: '/app-api/node/pin/update', data })
}

// 删除node_pin
export function deletePin(id: number) {
  return defHttp.delete({ url: `/app-api/node/pin/delete?id=${id}` })
}

// 导出node_pin Excel
export function exportPin(params) {
  return defHttp.download({ url: '/app-api/node/pin/export-excel', params }, 'node_pin.xls')
}
